/*    */ package cn.zzuisa.news.util;
/*    */ 
/*    */ import cn.zzuisa.news.enums.CodeEnums;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class EnumUtil
/*    */ {
/*    */   public static <T extends CodeEnums> T getByCode(Integer code, Class<T> enumClass) {
/*    */     byte b;
/*    */     int i;
/*    */     CodeEnums[] arrayOfCodeEnums;
/* 14 */     for (i = (arrayOfCodeEnums = (CodeEnums[])enumClass.getEnumConstants()).length, b = 0; b < i; ) { T each = (T)arrayOfCodeEnums[b];
/* 15 */       if (code.equals(each.getCode()))
/* 16 */         return each; 
/*    */       b++; }
/*    */     
/* 19 */     return null;
/*    */   }
/*    */ }


/* Location:              /Users/frank/Desktop/admin/WEB-INF/classes/!/cn/zzuisa/news/util/EnumUtil.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.0.7
 */